package com.ruiyin.controller;

import java.util.HashMap;
import java.util.Map;

public class BaseController {
    private static String CODE = "code";
    private static String DATA = "DATA";
    private static String SUCCESS = "200";
    private static String FAILED = "101";


    public Map<String,Object>sendSuccess(String msg){
        Map<String,Object> content = new HashMap<>();
        content.put(CODE,SUCCESS);
        content.put(DATA,msg);
        return content;
    }

    public Map<String,Object>sendFailed(String msg){
        Map<String,Object>content = new HashMap<>();
        content.put(CODE,FAILED);
        content.put(DATA,msg);
        return content;
    }
}
